using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace ScytheEngine
{
	public class ObjectNode : SceneGraphNode
	{
		private Object m_Object;

		public ObjectNode(Object obj)
		{
			m_Object = obj;
		}

		public override void Draw( GraphicsDevice gfxDev )
		{
			m_Object.Draw( gfxDev );
		}

		public override void Update( GameTime gameTime )
		{
			m_Object.Update( gameTime );
		}

        public override void LoadContent(GraphicsDevice gfxDev, Microsoft.Xna.Framework.Content.ContentManager loader)
        {
            if(m_Object is ILoadable)
            {
                ((ILoadable)m_Object).LoadContent(gfxDev, loader);
            }
        }
	}
}
